<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<title>$$.confirm()</title>
<!-- KUI -->
<link rel="stylesheet" href="../../../style/kelat.css" media="all"/>
<!-- 扩展样式 -->
<link rel="stylesheet" href="../../../style/theme.css" media="all"/>
<style>
.ColorPalette{height:35px;
line-height:35px;
text-align:center;}
.GridShow .Row{margin-bottom:10px;}
.GridShow [class^=Col]{line-height:20px;padding:5px;margin-bottom:5px}
</style>
</head>
<body >
<div>
   <div class="HelpBox" id="WrapperArea">
   
	<h2>$$.confirm(text,[title, callbackOk, callbackCancel],[buttonText])</h2>
		<h3>概述</h3>
		<div class="desc">
		<p>我们需要调用以下任一一种方法来打开弹层:</p>
		<p>$$.confirm(text, [title, callbackOk, callbackCancel])</p>
		<p>$$.confirm(text, [title, callbackOk, callbackCancel], [buttonText])</p>
		<p>$$.confirm(text, [callbackOk, callbackCancel])</p>
		<p>$$.confirm(text, [callbackOk, callbackCancel], [buttonText])</p>
		</div>
		<ul class="List">
			<li>text - <span class="CG">string</span> 文本</li>
			<li>title - <span class="CG">string</span> 弹层标题，<span class="CR">可选</span>。</li>
			<li>callbackOk - <span class="CG">function</span> 当用户点击 “确定” 按钮时，回调函数将被执行，<span class="CR">可选</span>。</li>
			<li>callbackCancel - <span class="CG">function</span> 当用户点击 “取消” 按钮时，回调函数将被执行，<span class="CR">可选</span>。</li>
			<li>buttonText - <span class="CG">Array</span> 弹层按钮的文本，默认是 “确定” | “取消” ，可以自定义，<span class="CR">可选</span>。</li>
		</ul>
	<div class="example">
        <h3>实例</h3>
        <h4>弹层:</h4>
		<h5>HTML 代码:</h5>
        <pre><code>&lt;button type="button" class="Btn BtnPrimary InkRipple ConfirmBtn">确认消息框&lt;/button></code></pre>
		<h5>js 代码:</h5>
		<pre><code>$$(".ConfirmBtn").on("click",function(){
  $$.confirm("确认消息框",function(){
    $$.alert("alert警告消息框",function(){
      $$.prompt("欢迎体验KMUI")
    });
  });
});</code></pre>
		<button type="button" class="Btn BtnBig BtnPrimary InkRipple ConfirmBtn">确认消息框</button>
		
   </div>

</div>
<script type="text/javascript" src="../../../script/kelat.js"></script>
<script type="text/javascript">
$$(document).ready(function(){
	$$(".ConfirmBtn").on("click",function(){
					$$.confirm("确认消息框",function(){
						$$.alert("alert警告消息框",function(){
							$$.prompt("欢迎体验KMUI")
						});
					});
				});
});
</script>
</div>
</body>
</html>
